<?php
$uid2 = $_POST['uid2'];//关注对象
include ("conn.php");
$sql = "SELECT * FROM attention WHERE uid2=".(int)$uid2;
$result = $conn->query($sql);
$fansNum = $result->num_rows;
echo '{"fansNum":'.$fansNum.'}'
?>